home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20030409-20031118
/
000303_fdc@sesame.cc.columbia.edu_Thu Sep 25 17:58:30 EDT 2003.msg
< prev
next >
Wrap
Text File
|
2003-11-18
|
3KB
|
83 lines
Article: 14547 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news-not-for-mail
From: fdc@sesame.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: How to make use of a terminal server
Date: 25 Sep 2003 17:58:25 -0400
Organization: Columbia University
Lines: 66
Message-ID: <bkvoe1$s9d$1@sesame.cc.columbia.edu>
References: <gQHcb.483$z11.142@newssvr22.news.prodigy.com>
NNTP-Posting-Host: sesame.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1064527106 27304 128.59.59.56 (25 Sep 2003 21:58:26 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 25 Sep 2003 21:58:26 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14547
In article <gQHcb.483$z11.142@newssvr22.news.prodigy.com>,
Jun Zhang <nugulus@netscape.net> wrote:
: I have access to a terminal server where a modem pool is served.
: Invokation of the modem is like the following,
:
: telnet hostname portnum
: Username: (type name and return)
: Password: (type pass and return)
: atdtphonenumber
:
: I tried to use the following kermit script to automate the authentication,
:
: #!/usr/local/bin/kermit
: def myuserid username
: def mypasswd password
: set carrier-watch off
: set host hostname portnum
:
You need an "if failure" command here in case the connection fails.
: for \%i 1 10 1 {
: input 20 Username:
: if success break
: output \13
: }
: if > \%i 10 exit 1 No login prompt.
: output \m(myuserid)\13
:
: for \%j 1 10 1 {
: input 10 Password:
: if success break
: output \13
: {
:
That should be a right brace.
: if > \%j 10 exit No Password prompt.
: output \m(mypasswd)\13
: undef mypasswd
:
: but password is always prompted interactively. My immediate purpose is
: to use the dial command in the kermit script, how can I do it?
:
I don't understand what you mean by "password is always prompted
interactively". The password prompt is printed by the terminal server,
correct? Therefore "input 10 Password:" should see it and succeed, and
then the password will be sent by the "output \m(mypasswd)\13" command.
Are you saying that this is not happening?
Maybe you are using a secure version of C-Kermit and the terminal server
is requesting a secure form of authentication, which causes C-Kermit to
prompt for the password locally? To debug this, tell C-Kermit to "set
telnet debug on".
Anyway, after you have received the Password prompt and sent the password,
you can:
set modem type <name-of-modem>
dial <phone-number>
if fail (do something)
Also see:
http://www.columbia.edu/kermit/ckermit80.html#x14
- Frank